﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ManageBanking.Models
{
    public class UpdateUserModels
    {
        private OnlineBankingDataContext olbk = new OnlineBankingDataContext();

        public void UpdateUsername(int IdUsername, string Username, string Name, DateTime DateBirth, string Address, string PlaceBirth, string Job)
        {
            Username un = olbk.Usernames.Where(u => u.IdUsername == IdUsername).First();
            un.Username1 = Username;
            un.Name = Name;
            un.DateBirth = DateBirth;
            un.Address = Address;
            un.PlaceBirth = PlaceBirth;
            un.Job = Job;
            olbk.SubmitChanges();
        }
    }
}
